package io.elegant

import io.elegant.sessions.*
import io.elegant.sessions.media.MediaPlayerSession
import io.elegant.sessions.media.MediaRecorderSession
import io.elegant.sessions.widgets.*

fun String.toSessionClass() = when (this) {
    "AudioTrack" -> AudioTrackSession::class
    "GenericDialog" -> GenericDialogSession::class
    "MediaPlayer" -> MediaPlayerSession::class
    "MediaRecorder" -> MediaRecorderSession::class
    "SoundPool" -> SoundPoolSession::class
    "TextToSpeech" -> TextToSpeechSession::class
    "WidgetButton" -> WidgetButtonSession::class
    "WidgetCheckBox" -> WidgetCheckBoxSession::class
    "WidgetEditor" -> WidgetEditorSession::class
    "WidgetProgressBar" -> WidgetProgressBarSession::class
    "WidgetSpinner" -> WidgetSpinnerSession::class
    "WidgetText" -> WidgetTextSession::class
    "WidgetRadio" -> WidgetRadioSession::class
    "WidgetFileUploader" -> WidgetFileUploaderSession::class
    "WidgetImage" -> WidgetImageSession::class
    "Requests" -> RequestsSession::class
    "Sensor" -> SensorSession::class
    "File" -> FileSession::class
    else -> null
}